package cn.com.self.apis.escrow.entity;

import cn.com.selfsoft.smartcity.commons.entity.AbstractEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;

@ApiModel(value = "托管预算增加申请表")
@Data
@TableName("escrow_amount_change")
public class EscrowAmountChange extends AbstractEntity implements Serializable {

    @ApiModelProperty(value = "发起人id")
    private BigInteger memberId;

    @ApiModelProperty(value = "审批人id(如果托管方发起，审批人id填入开发方，反之如果开发方发起，审批人填入需求方)")
    private BigInteger memberedId;

    @ApiModelProperty(value = "托管id")
    private BigInteger escrowId;

    @ApiModelProperty(value = "金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "描述")
    private String content;

    @ApiModelProperty(value = "申请类型（1减少、2增加）")
    private Integer changeType;

    @ApiModelProperty(value = "审核状态（1申请中、2通过、3不通过）")
    private Integer changeState;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;
    @ApiModelProperty(value = "更新时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date updateTime;

    @TableField(exist=false)
    @ApiModelProperty(value = "发起人名称")
    private String memberName;

    @TableField(exist=false)
    @ApiModelProperty(value = "审批人名称")
    private String memberedName;
}
